]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Don't use 'undefined' as boolean
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 13 Jun 2017 04:49:07 +0000 (06:49 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 13 Jul 2017 15:23:54 +0000 (17:23 +0200)
Make sure we pass a proper false value instead of undefined to
avoid warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=781471

js/ui/keyboard.js
js/ui/notificationDaemon.js

index 2eaa51948c6636527bcba8b33b5e7b3689c505c6..67ba8b88b0b444eb3a9c07bd8fdc5a87371c631c 100644 (file)
@@ -607,7 +607,7 @@ const Keyboard = new Lang.Class({
     shouldTakeEvent: function(event) {
         let actor = event.get_source();
         return Main.layoutManager.keyboardBox.contains(actor) ||
-               actor._extended_keys || actor.extended_key;
+               !!actor._extended_keys || !!actor.extended_key;
     },
 
     _clearKeyboardRestTimer: function() {
index 62096258d4bad9e3dd48f377b7c4cd023ebe6913..315bfdb175d0f214fb91f9e13ef37e8d370e4346 100644 (file)
@@ -391,10 +391,10 @@ const FdoNotificationDaemon = new Lang.Class({
                 notification.setUrgency(MessageTray.Urgency.CRITICAL);
                 break;
         }
-        notification.setResident(hints.resident == true);
+        notification.setResident(!!hints.resident);
         // 'transient' is a reserved keyword in JS, so we have to retrieve the value
         // of the 'transient' hint with hints['transient'] rather than hints.transient
-        notification.setTransient(hints['transient'] == true);
+        notification.setTransient(!!hints['transient']);
 
         let sourceGIcon = source.useNotificationIcon ? gicon : null;
         source.processNotification(notification, sourceGIcon);